package com.glacier.yuyuan.gen.webapp.service.impl;

import com.glacier.common.support.service.impl.BaseServiceImpl;
import com.glacier.yuyuan.gen.webapp.domain.GenTableField;
import com.glacier.yuyuan.gen.webapp.mapper.GenTableFieldMapper;
import com.glacier.yuyuan.gen.webapp.service.GenTableFieldService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.io.Serializable;
import java.util.List;

/**
 * date 2023-01-28 21:59
 * 代码生成表字段 业务层
 *
 * @author glacier
 * @version 1.0.0
 */
@Transactional(readOnly = true)
@Service
public class GenTableFieldServiceImpl extends BaseServiceImpl<GenTableFieldMapper, GenTableField>
        implements GenTableFieldService {

    public GenTableFieldServiceImpl() {
        super(GenTableFieldMapper.class);
    }

    /**
     * 根据表id 查询所有表字段信息
     *
     * @param tableId 表id
     * @return 表字段集合
     */
    @Override
    public <ID extends Serializable> List<GenTableField> findByTableId(ID tableId) {
        return mapper.findByTableId(tableId);
    }
}
